{{ include './header.html'}}

<body>
  <div id="wrap">
    {{ include './left.html'}}
    <!-- 右侧具体内容栏目 -->
    <div id="rightContent">
      <div id="personInfor" style="text-align: right; background-color:blanchedalmond;">
        <p id="userName">
          <a> 用户:{{adminname}} </a>
          <a href="/admin/login/loginout">退出</a>
        </p>
      </div>

      <!-- Tab panes -->
      <!-- 打印记录管理模块 -->
      <div role="tabpanel" class="tab-pane" id="record">

        <div class="check-div form-inline">
          <div class="col-xs-3"></div>
          <div class="col-xs-4">
            <input type="text" id="username" class="form-control input-sm" placeholder="输入文字搜索">
            <button class="btn btn-white btn-xs " onclick="findRecord()">查 询 </button>
          </div>
        </div>

        <div class="data-div">
          <div class="row tableHeader">
            <div class="col-xs-1 " style="text-align:center;">
              编号
            </div>
            <div class="col-xs-2 " style="text-align:center;">
              用户
            </div>
            <div class="col-xs-2" style="text-align:center;">
              文件名
            </div>
            <div class="col-xs-1">
              份数
            </div>
            <div class="col-xs-2">
              状态
            </div>
            <div class="col-xs-3">
              打印时间
            </div>
          </div>

          <div class="tablebody">
            <% for(var i=0; i<recordlist.length; i++) {%>
              <div class="row">
                <div class="col-xs-1 " style="text-align:center;">
                  <%= recordlist[i].rowid %>
                </div>
                <div class="col-xs-2 " style="text-align:center;">
                  <%= recordlist[i].user %>
                </div>
                <div class="col-xs-2" style="text-align:center;">
                  <%= recordlist[i].fileName %>
                </div>
                <div class="col-xs-1">
                  <%= recordlist[i].number %>
                </div>
                <div class="col-xs-1">
                  <%= recordlist[i].status %>
                </div>
                <div class="col-xs-3" style="text-align:center;">
                  <%= recordlist[i].date %>
                </div>
              </div>
              <% } %>
          </div>
          <div class="pagination" id="pagination3" style="float: right; background-color: cornflowerblue; "></div>

        </div>
        <script type="text/javascript" src="../../js/jqPaginator.js"></script>
        <script>
          $('#pagination3').jqPaginator({
            totalPages: {{ recordtotalPages }},
            visiblePages: 8,
            currentPage: {{ currentPage }},
            onPageChange: function (num, type) {
              console.log(num, type)
              if (type == 'change') {
                location.href = "/admin/index/recordnextpage?page=" + num
              }
            }
            })

        </script>
        <script>
          function findRecord() {
            data = $('#username').val()
            alert(data)
            location.href = "/admin/index/findUser?username=" + data
          }
        </script>
        <!--页码块-->

      </div>
    </div>
  </div>

</body>

</html>